package com.jiutong.meipenggang.ui.activitys;

import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.widget.ListView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.jiutong.meipenggang.R;
import com.jiutong.meipenggang.base.AppManager;
import com.jiutong.meipenggang.base.BaseActivity;
import com.jiutong.meipenggang.base.ViewHolder;

import java.util.ArrayList;

import butterknife.Bind;
import butterknife.OnClick;

public class FinancialProductsActivity extends BaseActivity {


    @Bind(R.id.tv_common_title)
    TextView tvCommonTitle;
    @Bind(R.id.rl_common_title_back)
    RelativeLayout rlCommonTitleBack;
    @Bind(R.id.lv_financial_products)
    ListView lvFinancialProducts;
    @Bind(R.id.tv_financialproducts_hint)
    TextView tvFinancialproductsHint;

//    private List<FinancialProductsRespond> list = new ArrayList<>();

    @Override
    public int getLayoutResouceId() {
        return R.layout.activity_financial_products;
    }

    @Override
    protected void initView() {
        super.initView();

        tvCommonTitle.setText("理财产品");
//        list.add(new FinancialProductsRespond("两个月", "8.00%", "1000.00", "1000.00"));
//        if (list != null && list.size() > 0) {
//            tvFinancialproductsHint.setVisibility(View.GONE);
//            lvFinancialProducts.setVisibility(View.VISIBLE);
//        }else{
//            tvFinancialproductsHint.setVisibility(View.VISIBLE);
//            lvFinancialProducts.setVisibility(View.GONE);
//        }
//        FinancialProductsAdapter adapter = new FinancialProductsAdapter(mContext, list, R.layout.item_financia_products);
//        lvFinancialProducts.setAdapter(adapter);
    }

    @OnClick(R.id.rl_common_title_back)
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.rl_common_title_back:
                AppManager.getAppManager().finishActivity(this);
                break;
        }
    }



//    public class FinancialProductsAdapter extends CommonAdapter<FinancialProductsRespond> {
//
//        public FinancialProductsAdapter(Context context, List<FinancialProductsRespond> listDatas, int layoutId) {
//            super(context, listDatas, layoutId);
//        }
//
//        @Override
//        protected void fillData(ViewHolder holder, final int position) {
//            TextView tv_item_financialproducts_month = holder.getView(R.id.tv_item_financialproducts_month);
//            TextView tv_item_financialproducts_rate = holder.getView(R.id.tv_item_financialproducts_rate);
//            TextView tv_item_financialproducts_hava_money = holder.getView(R.id.tv_item_financialproducts_hava_money);
//            TextView tv_item_financialproducts_income_money = holder.getView(R.id.tv_item_financialproducts_income_money);
//            Fin respond = listDatas.get(position);
//            tv_item_financialproducts_month.setText(respond.getMonth());
//            tv_item_financialproducts_rate.setText(respond.getRate());
//            tv_item_financialproducts_hava_money.setText(respond.getHasmoney());
//            tv_item_financialproducts_income_money.setText(respond.getIncome_money());
//        }
//    }
}
